<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>间距 - 组件演示</title>
    <link rel="stylesheet" href="../css/style.css">
</head>
<body>
    <div class="container">
        <header class="header">
            <h1>🚀 openHarmony_Cordova_NutpiDesign</h1>
            <p class="subtitle">组件演示 - 间距组件</p>
        </header>

        <nav class="demo-nav">
            <a href="../index.html" class="nav-back">← 返回首页</a>
        </nav>

        <main class="main-content">
            <section class="demo-section">
                <h2>📐 间距演示</h2>
                
                <div class="demo-content">
                    <h3>水平间距</h3>
                    <div style="display: flex; gap: 8px; margin: 20px 0;">
                        <div class="box">8px</div>
                        <div class="box">8px</div>
                        <div class="box">8px</div>
                    </div>

                    <div style="display: flex; gap: 16px; margin: 20px 0;">
                        <div class="box">16px</div>
                        <div class="box">16px</div>
                        <div class="box">16px</div>
                    </div>

                    <div style="display: flex; gap: 24px; margin: 20px 0;">
                        <div class="box">24px</div>
                        <div class="box">24px</div>
                        <div class="box">24px</div>
                    </div>

                    <h3>垂直间距</h3>
                    <div style="display: flex; flex-direction: column; gap: 8px; margin: 20px 0;">
                        <div class="box">8px</div>
                        <div class="box">8px</div>
                        <div class="box">8px</div>
                    </div>

                    <h3>内边距</h3>
                    <div class="box" style="padding: 8px;">padding: 8px</div>
                    <div class="box" style="padding: 16px; margin-top: 8px;">padding: 16px</div>
                    <div class="box" style="padding: 24px; margin-top: 8px;">padding: 24px</div>

                    <h3>外边距</h3>
                    <div class="box" style="margin-bottom: 8px;">margin-bottom: 8px</div>
                    <div class="box" style="margin-bottom: 16px;">margin-bottom: 16px</div>
                    <div class="box">margin-bottom: 0</div>
                </div>
            </section>

            <section class="demo-section">
                <h2>使用代码</h2>
                <pre><code>// 水平间距
&lt;div style="display: flex; gap: 16px;"&gt;
    &lt;div&gt;元素1&lt;/div&gt;
    &lt;div&gt;元素2&lt;/div&gt;
&lt;/div&gt;

// 垂直间距
&lt;div style="display: flex; flex-direction: column; gap: 16px;"&gt;
    &lt;div&gt;元素1&lt;/div&gt;
    &lt;div&gt;元素2&lt;/div&gt;
&lt;/div&gt;</code></pre>
            </section>
        </main>

        <footer class="footer">
            <p>&copy; 2025 OpenHarmony 三方库适配中心 | MIT License</p>
        </footer>
    </div>

    <style>
        .demo-content {
            background: var(--bg-light);
            padding: 20px;
            border-radius: 8px;
        }

        .demo-content h3 {
            margin-top: 20px;
            margin-bottom: 10px;
            font-size: 14px;
            color: var(--text-primary);
        }

        .box {
            background: white;
            border: 1px solid var(--border-color);
            padding: 12px;
            border-radius: 4px;
            font-size: 12px;
            color: var(--text-secondary);
        }
    </style>
</body>
</html>
